import request from '@/utils/request'

export const getSuggestionsAPI = (q) => {
  return request({
    url: '/v1_0/suggestion',
    params: {
      q
    }
  })
}

/**
 *
 * @param {string } q
 * @param {number} page
 * @param {number} per_page
 * @returns promise
 */
export const getResultAPI = (q, page, per_page) => {
  return request({
    url: '/v1_0/search',
    params: { q, page, per_page }
  })
}
